{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
  <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
             <form action="" method="post">
                <div class="box-header with-border">
                    <span class="fa fa-table" style="float:left; font-size:18px; margin-top:2px; color:#3c8dbc;"></span>
                    <p class="box-title">期末报表</p>
                </div>
                <div class="box-body">
                      <h3 class="text-center"> {%$semester_data.semester_name%}绩效工资表</h3>
                      <table class="table table-bordered">   
                             <tr>
                                <td rowspan="2">编号</td>
                                <td rowspan="2">姓名</td>
                                <td rowspan="2">教学奖</td>
                                <td rowspan="2">全勤</td>
                                <td colspan="4" align="center">奖励</td>
                                <td rowspan="2">毕业班奖励</td>
                                <td rowspan="2">其它</td>
							 </tr>
                             <tr>
                                <td>班风</td>
                                <td>公开课</td>
                                <td>个人</td>
                                <td>指导学生</td>
							 </tr>
							 {%foreach from=$out_lists key=key item=value%}
                             <tr>
                                <td>{%$value.lists.staff_number%}</td>
                                <td>{%$value.lists.staff_name%}</td>
                                <td><input id="jia{%$key%}" name="teach_{%$value.staff_id%}" value="{%$value.lists.teach%}" class="jia" style="width:60%"> <span class="niu" onclick="ab({%$key%}, 'jia')">+</span></td>
                                <td><input id="money{%$key%}" name="duty_{%$value.staff_id%}" value="{%$value.lists.duty%}" class="money" style="width:60%"> <span class="niu" onclick="ab({%$key%}, 'money')">+</span></td>
                                <td><input id="class{%$key%}" name="class_{%$value.staff_id%}" value="{%$value.lists.class%}" class="class" style="width:60%"> <span class="niu"  onclick="ab({%$key%}, 'class')">+</span></td>
                                <td><input id="open{%$key%}" name="open_{%$value.staff_id%}" value="{%$value.lists.open%}" class="open" style="width:60%"> <span class="niu"  onclick="ab({%$key%}, 'open')">+</span></td>
                                <td><input id="single{%$key%}" name="single_{%$value.staff_id%}" value="{%$value.lists.single%}" class="single" style="width:60%"> <span class="niu"  onclick="ab({%$key%}, 'single')">+</span></td>
                                <td><input id="xue{%$key%}" name="student_{%$value.staff_id%}" value="{%$value.lists.student%}" class="xue" style="width:60%"> <span class="niu" onclick="ab({%$key%}, 'xue')">+</span></td>
                                <td><input id="extra{%$key%}" name="finish_{%$value.staff_id%}" value="{%$value.lists.finish%}" class="extra" style="width:60%"> <span class="niu" onclick="ab({%$key%}, 'extra')">+</span></td>
                                <td><input id="other{%$key%}" name="other_{%$value.staff_id%}" value="{%$value.lists.other%}" class="other" style="width:60%"> <span class="niu" onclick="ab({%$key%}, 'other')">+</span></td>
							 </tr>
							 {%/foreach%}
						 </table>      	   
				    </div><!--box-body --> 
                    <div class="box-footer text-center">
                        <button type="submit" class="btn btn-primary"> 确 定</button>   	   
                    </div>
                 </form>
             </div><!--box box-default box-solid-->
          </section>   
        </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->
{%include file="index.footer.tpl.php"%}
<script>
function ab(id, c){
	var s = 0;
    var d = $("." + c);
	var g = "#" + c;
	// 遍历
	$.each(d, function (k, v){		

		if( $(this).val() == "" ){
			var i = k+1;
			// 一个不为空
			if($(g+k).val() != ""){
				s = $(g+k).val();
			}
			if(i <= id){
				$(g+i).val(s);
			}		
		}
  });
};
</script> 



